﻿using System;
using System.Collections.Generic;
using LINQ = JLL.China.Infrastructure.Repositories.LINQ2SQL;
using JLL.China.Infrastructure.Repositories.ProjectNames;
using JLL.China.Model;

namespace JLL.China.Infrastructure.Repositories.ProjectNames
{
    public static class ProjectNameFactory
    {
        public static Model.ProjectName FromLINQObject(LINQ.ProjectName item)
        {
            if (item == null)
            {
                return null;
            }
            else
            {
                var model = new Model.ProjectName
                {
                    LanguageFID = (decimal)item.LanguageFID,
                    ProjectNameID = (decimal)item.ProjectName_ID,
                    Value = item.Value
                };
                return model;
            }
            
        }

        public static LINQ.ProjectName ToLINQObject(Model.ProjectName item)
        {
            var model = new LINQ.ProjectName
            {
                LanguageFID = item.LanguageFID,
                ProjectName_ID = item.ProjectNameID,
                Value = item.Value
            };
            return model;
        }
    }
}
